﻿using System;
using System.Net;
using System.Xml.Linq;

namespace ArmoryBrowser.Entities
{
    public class Glyph
    {
        #region Fields
        private string _effectField;
        private string _iconField;
        private string _idField;
        private string _nameField;
        private string _typeField;
        #endregion
        #region Properties
        public string Effect
        {
            get
            {
                return this._effectField;
            }
            set
            {
                this._effectField = value;
            }
        }

        public string Icon
        {
            get
            {
                return this._iconField;
            }
            set
            {
                this._iconField = value;
            }
        }

        public string Id
        {
            get
            {
                return this._idField;
            }
            set
            {
                this._idField = value;
            }
        }

        public string Name
        {
            get
            {
                return this._nameField;
            }
            set
            {
                this._nameField = value;
            }
        }

        public string Type
        {
            get
            {
                return this._typeField;
            }
            set
            {
                this._typeField = value;
            }
        }
        #endregion
        #region Constructor
        public Glyph(XElement element)
        {
            Effect = element.GetAttributeValue("effect");
            Icon = element.GetAttributeValue("icon");
            Id = element.GetAttributeValue("id");
            Name = element.GetAttributeValue("name");
            Type = element.GetAttributeValue("type");
        }
        #endregion
    }
}
